<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1 {
            /* 当不写宽度的时候，跟父元素的宽度一致 */
            /* width: 100px; */
            /* height: 100px; */
            background: pink;
            float: left;
            /* float: left; */
            /* padding: 20px; */
            /* border: 1px solid #000; */
            /* margin: 20px; */
        }

        .box2 {
            width: 200px;
            height: 200px;
            background: green;
            clear: both;
            float: left;
        }

        .box3 {
            width: 300px;
            height: 300px;
            background: blue;
            /* border: 1px solid #000; */
            /* margin-bottom: 40px; */
        }

        .box4 {
            /* width: 300px; */
            height: 100px;
            background: yellow;
            /* margin-top: 50px; */
            margin-top: 30px;
            padding: 10px;
            margin: 1px solid #000;

        }

        .inline1 {
            background: red;
        }

        .inline1 {
            background: skyblue;
        }
    </style>
</head>
<body>
    <div class="box1">我是一个盒子</div>
    <!-- <div class="box2">我是一个另外一个盒子</div>
    <div class="box3">我是一个另外一个盒子</div> -->

    <!-- <div class="box3">
        <div class="box4">黑子的内容</div>
    </div> -->
    <!-- <span class="inline1">内联1</span>
    <span class="inline2">内联2</span> -->
</body>
</html>